package com.example.yunbiji0314.dao;

import com.example.yunbiji0314.pojo.TPermission;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TPermissionDao {

    //根据用户id查询权限
    @Select("select * \n" +
            "from t_permission\n" +
            "where id " +
            "IN (select permission_id from t_role_permission \n" +
            "where role_id IN (select role_id from t_user_role where user_id=#{id}))")
    List<TPermission> findById(Integer id);
}
